SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for config_info
-- ----------------------------
DROP TABLE IF EXISTS `config_info`;
CREATE TABLE `config_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `c_use` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `effect` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `type` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `c_schema` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=908 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info';

-- ----------------------------
-- Records of config_info
-- ----------------------------
BEGIN;
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (2, 'example-gateway.yaml', 'example-cloud', 'spring:\n  cloud:\n    gateway:\n      routes:\n        - id: example-system\n          uri: lb://example-system\n          predicates:\n            - Path=/system/**\n          filters:\n            - RewritePath=/system/(?<segment>.*), /$\\{segment}\n        - id: example-auth\n          uri: lb://example-auth\n          predicates:\n            - Path=/auth/**\n          filters:\n            - RewritePath=/auth/(?<segment>.*), /$\\{segment}\n        - id: example-storage\n          uri: lb://example-storage\n          predicates:\n            - Path=/storage/**\n          filters:\n            - RewritePath=/storage/(?<segment>.*), /$\\{segment}\n        - id: example-message\n          uri: lb://example-message\n          predicates:\n            - Path=/message/**\n          filters:\n            - RewritePath=/message/(?<segment>.*), /$\\{segment}\n      globalcors:\n        cors-configurations:\n          \'[/**]\': # 允许跨域访问的资源\n            allowedOrigins: \"*\" # 跨域允许来源\n            allowedMethods: \"*\" # 跨域允许方法\n            allowedOriginPatterns: \"*\"\n            allowedHeaders: \"*\"\n    sentinel:\n      transport:\n        dashboard: 127.0.0.1:8858\n        heartbeat-interval-ms: 5000\n      eager: true\n      datasource:\n        flow:\n          nacos:\n            server-addr: ${spring.cloud.nacos.config.server-addr}\n            namespace: ${spring.cloud.nacos.config.namespace}\n            group-id: ${spring.cloud.nacos.config.group}\n            username: ${spring.cloud.nacos.config.username}\n            password: ${spring.cloud.nacos.config.password}\n            data-id: ${spring.application.name}-flow-rules\n            data‐type: json\n            rule‐type: flow # 流控规则', '77b8c16231f9a298fb685971a988a829', '2022-08-07 09:12:30', '2023-02-04 09:38:06', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (16, 'example-application.yaml', 'example-cloud', 'mysql:\n  host: 127.0.0.1\n  port: 3306\n  username: root\n  password: 123456\nredis:\n  host: 127.0.0.1\n  port: 6379\nminio:\n  endpoint: http://127.0.0.1:9000\n  access-key: admin\n  secret-key: admin123\n  bucket: public\n# 暴露端点\nmanagement:\n  endpoints:\n    web:\n      base-path: /actuator\n      exposure:\n        include: \'*\'\n  endpoint:\n    health:\n      show-details: always\n\nspring:\n  redis:\n    host: ${redis.host}\n    port: ${redis.port}\n    database: 1\n    connect-timeout: 10000\n    lettuce:\n      pool:\n        max-active: 20\n        max-wait: -1\n        max-idle: 5\n        min-idle: 0\n  cloud:\n    nacos:\n      discovery:\n        server-addr: ${spring.cloud.nacos.config.server-addr}\n        namespace: ${spring.cloud.nacos.config.namespace}\n        group: ${spring.cloud.nacos.config.group}\n        username: ${spring.cloud.nacos.config.username}\n        password: ${spring.cloud.nacos.config.password}\n        metadata:\n          management:\n            context-path: ${management.endpoints.web.base-path}\n\nmybatis-plus:\n  configuration:\n    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl', '06fbaad82265d77bf86311ac121000e3', '2022-09-09 11:45:50', '2023-01-11 11:51:20', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (53, 'example-gateway-flow-rules', 'example-cloud', '[\n  {\n    \"app\": \"example-gateway\",\n    \"limitApp\": \"default\",\n    \"resource\": \"example-system-biz\",\n    \"grade\": 1,\n    \"count\": 5.0,\n    \"strategy\": 0,\n    \"refResource\": null,\n    \"controlBehavior\": 0,\n    \"warmUpPeriodSec\": 10,\n    \"maxQueueingTimeMs\": 500,\n    \"clusterMode\": false\n  }\n]', '364c15c6ce7597f1e5bb4f2f2e9113f0', '2022-09-12 07:52:34', '2022-09-20 11:12:35', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'json', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (87, 'example-auth.yaml', 'example-cloud', 'spring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/example-cloud?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}\n\ncom:\n  example:\n    security:\n      permit-urls:\n        - /actuator/**\n        - /oauth/logout', '719008d243d2236af7b007e7758c7a9f', '2022-10-28 09:01:58', '2023-01-16 11:40:54', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (93, 'example-storage.yaml', 'example-cloud', 'com:\n  example:\n    amazons3:\n      endpoint: ${minio.endpoint}\n      access-key: ${minio.access-key}\n      secret-key: ${minio.secret-key}\n      bucket: ${minio.bucket}', 'fb3baf63163979e18590d850f300df9f', '2022-12-10 11:43:33', '2023-01-12 11:17:23', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (878, 'example-system.yaml', 'example-cloud', 'spring:\n  mvc:\n    pathmatch:\n      matching-strategy: ant_path_matcher\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/example-cloud?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}\n\ncom:\n  example:\n    mvc:\n      error:\n        throwable: false\n    mybatis:\n      multi-tenant:\n        base-package: com.example.system.entity\n        master: e_cloud\n    security:\n      permit-urls:\n        - /actuator/**\n        - /user/*/detail\n        - /self/register\n        - /self/reset_password\n        - /tenant/list\n        - /sms/code/**\n  ', '01da1322b01436dbbbcd1e4dfad0003c', '2022-12-25 13:28:51', '2023-01-16 11:40:24', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (885, 'example-gateway.yaml', 'mall', 'spring:\n  cloud:\n    gateway:\n      routes:\n        - id: example-system\n          uri: lb://example-system\n          predicates:\n            - Path=/system/**\n          filters:\n            - RewritePath=/system/(?<segment>.*), /$\\{segment}\n        - id: example-auth\n          uri: lb://example-auth\n          predicates:\n            - Path=/auth/**\n          filters:\n            - RewritePath=/auth/(?<segment>.*), /$\\{segment}\n        - id: example-storage\n          uri: lb://example-storage\n          predicates:\n            - Path=/storage/**\n          filters:\n            - RewritePath=/storage/(?<segment>.*), /$\\{segment}\n        - id: mall-goods\n          uri: lb://mall-goods\n          predicates:\n            - Path=/goods/**\n          filters:\n            - RewritePath=/goods/(?<segment>.*), /$\\{segment}\n        - id: mall-seckill\n          uri: lb://mall-seckill\n          predicates:\n            - Path=/seckill/**\n          filters:\n            - RewritePath=/seckill/(?<segment>.*), /$\\{segment}\n      globalcors:\n        cors-configurations:\n          \'[/**]\': # 允许跨域访问的资源\n            allowedOrigins: \"*\" # 跨域允许来源\n            allowedMethods: \"*\" # 跨域允许方法\n            allowedOriginPatterns: \"*\"\n            allowedHeaders: \"*\"\n    sentinel:\n      transport:\n        dashboard: 127.0.0.1:8858\n        heartbeat-interval-ms: 5000\n      eager: true\n      datasource:\n        flow:\n          nacos:\n            server-addr: ${spring.cloud.nacos.config.server-addr}\n            namespace: ${spring.cloud.nacos.config.namespace}\n            group-id: ${spring.cloud.nacos.config.group}\n            username: ${spring.cloud.nacos.config.username}\n            password: ${spring.cloud.nacos.config.password}\n            data-id: ${spring.application.name}-flow-rules\n            data‐type: json\n            rule‐type: flow # 流控规则', 'bbcebfe5f1f1f5f4925c56fb5b5cafbe', '2023-01-12 15:15:06', '2023-01-12 15:16:58', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (886, 'example-application.yaml', 'mall', 'mysql:\n  host: 127.0.0.1\n  port: 3306\n  username: root\n  password: 123456\nredis:\n  host: 127.0.0.1\n  port: 6379\nminio:\n  endpoint: http://127.0.0.1:9000\n  access-key: admin\n  secret-key: admin123\n  bucket: public\n# 暴露端点\nmanagement:\n  endpoints:\n    web:\n      base-path: /actuator\n      exposure:\n        include: \'*\'\n  endpoint:\n    health:\n      show-details: always\n\nspring:\n  redis:\n    host: ${redis.host}\n    port: ${redis.port}\n    database: 1\n    connect-timeout: 10000\n    lettuce:\n      pool:\n        max-active: 20\n        max-wait: -1\n        max-idle: 5\n        min-idle: 0\n  cloud:\n    nacos:\n      discovery:\n        server-addr: ${spring.cloud.nacos.config.server-addr}\n        namespace: ${spring.cloud.nacos.config.namespace}\n        group: ${spring.cloud.nacos.config.group}\n        username: ${spring.cloud.nacos.config.username}\n        password: ${spring.cloud.nacos.config.password}\n        metadata:\n          management:\n            context-path: ${management.endpoints.web.base-path}\n\nmybatis-plus:\n  configuration:\n    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl', '06fbaad82265d77bf86311ac121000e3', '2023-01-12 15:15:06', '2023-01-12 15:15:06', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', NULL, NULL, NULL, 'yaml', NULL);
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (887, 'example-gateway-flow-rules', 'mall', '[\n  {\n    \"app\": \"example-gateway\",\n    \"limitApp\": \"default\",\n    \"resource\": \"example-system-biz\",\n    \"grade\": 1,\n    \"count\": 5.0,\n    \"strategy\": 0,\n    \"refResource\": null,\n    \"controlBehavior\": 0,\n    \"warmUpPeriodSec\": 10,\n    \"maxQueueingTimeMs\": 500,\n    \"clusterMode\": false\n  }\n]', '364c15c6ce7597f1e5bb4f2f2e9113f0', '2023-01-12 15:15:06', '2023-01-12 15:15:06', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', NULL, NULL, NULL, 'json', NULL);
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (888, 'example-auth.yaml', 'mall', 'spring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/example-cloud?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}\n\ncom:\n  example:\n    doc:\n      enabled: true\n      title: \'授权鉴权服务\'\n      description: \'授权鉴权服务\'\n      base-package: com.example.auth.endpoint\n    security:\n      permit-urls:\n        - /actuator/**\n        - /v2/api-docs\n        - /oauth/logout', 'd3e61debdfc528c55252e513ed64acae', '2023-01-12 15:15:06', '2023-01-12 15:15:06', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', NULL, NULL, NULL, 'yaml', NULL);
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (889, 'example-storage.yaml', 'mall', 'com:\n  example:\n    amazons3:\n      endpoint: ${minio.endpoint}\n      access-key: ${minio.access-key}\n      secret-key: ${minio.secret-key}\n      bucket: ${minio.bucket}', 'fb3baf63163979e18590d850f300df9f', '2023-01-12 15:15:06', '2023-01-12 15:15:06', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', NULL, NULL, NULL, 'yaml', NULL);
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (890, 'example-system.yaml', 'mall', 'spring:\n  mvc:\n    pathmatch:\n      matching-strategy: ant_path_matcher\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/example-cloud?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}\n\ncom:\n  example:\n    doc:\n      enabled: true\n      title: \'系统管理服务\'\n      description: \'系统管理服务\'\n      base-package: com.example.system.controller\n    mvc:\n      error:\n        throwable: false\n    mybatis:\n      multi-tenant:\n        base-package: com.example.system.entity\n        master: e_cloud\n    security:\n      permit-urls:\n        - /actuator/**\n        - /v2/api-docs\n        - /user/*/detail\n        - /self/register\n        - /self/reset_password\n        - /tenant/list\n        - /sms/code/**\n  ', 'de8694e745279c0acc86789ae6dc0a23', '2023-01-12 15:15:06', '2023-01-12 15:15:06', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', NULL, NULL, NULL, 'yaml', NULL);
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (892, 'mall-goods.yaml', 'mall', 'spring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/mall-goods?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}\n\ncom:\n  example:\n    mvc:\n      error:\n        throwable: false\n    mybatis:\n      multi-tenant:\n        base-package: com.example.goods.entity\n        master: e_cloud\n    security:\n      permit-urls:\n        - /actuator/**\n        - /v2/api-docs\n  ', '3df3a761e3a0b05cb04d79d0640757d4', '2023-01-12 15:19:58', '2023-01-12 15:21:22', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (894, 'mall-seckill.yaml', 'mall', 'spring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/mall-seckill?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}\n\ncom:\n  example:\n    mvc:\n      error:\n        throwable: false\n    mybatis:\n      multi-tenant:\n        base-package: com.example.seckill.entity\n        master: e_cloud\n    security:\n      permit-urls:\n        - /actuator/**\n        - /v2/api-docs\n  ', '7b747a81762ec2cfc1ffd204aa461c7e', '2023-01-12 15:21:43', '2023-01-12 15:22:17', NULL, '127.0.0.1', '', 'a201af03-371d-44ba-8c90-2445217f9a31', '', '', '', 'yaml', '');
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (905, 'example-message.yaml', 'example-cloud', 'spring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    type: com.alibaba.druid.pool.DruidDataSource\n    url: jdbc:mysql://${mysql.host}:${mysql.port}/example-cloud?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai\n    username: ${mysql.username}\n    password: ${mysql.password}', 'd1006c3fcd3ce96100499ad42949a610', '2023-02-07 11:09:02', '2023-02-07 11:09:23', NULL, '127.0.0.1', '', '636732f8-f054-4ee3-9fb5-4a03c502d902', '', '', '', 'yaml', '');
COMMIT;

-- ----------------------------
-- Table structure for config_info_aggr
-- ----------------------------
DROP TABLE IF EXISTS `config_info_aggr`;
CREATE TABLE `config_info_aggr` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'datum_id',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='增加租户字段';

-- ----------------------------
-- Records of config_info_aggr
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_info_beta
-- ----------------------------
DROP TABLE IF EXISTS `config_info_beta`;
CREATE TABLE `config_info_beta` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info_beta';

-- ----------------------------
-- Records of config_info_beta
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_info_tag
-- ----------------------------
DROP TABLE IF EXISTS `config_info_tag`;
CREATE TABLE `config_info_tag` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin COMMENT 'source user',
  `src_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_info_tag';

-- ----------------------------
-- Records of config_info_tag
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_tags_relation
-- ----------------------------
DROP TABLE IF EXISTS `config_tags_relation`;
CREATE TABLE `config_tags_relation` (
  `id` bigint NOT NULL COMMENT 'id',
  `tag_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`) USING BTREE,
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='config_tag_relation';

-- ----------------------------
-- Records of config_tags_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for group_capacity
-- ----------------------------
DROP TABLE IF EXISTS `group_capacity`;
CREATE TABLE `group_capacity` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '' COMMENT 'Group ID，空字符表示整个集群',
  `quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数，，0表示使用默认值',
  `max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_group_id` (`group_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='集群、各Group容量信息表';

-- ----------------------------
-- Records of group_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for his_config_info
-- ----------------------------
DROP TABLE IF EXISTS `his_config_info`;
CREATE TABLE `his_config_info` (
  `id` bigint unsigned NOT NULL,
  `nid` bigint unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `group_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `app_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL,
  `md5` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin,
  `src_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `op_type` char(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`nid`) USING BTREE,
  KEY `idx_gmt_create` (`gmt_create`) USING BTREE,
  KEY `idx_gmt_modified` (`gmt_modified`) USING BTREE,
  KEY `idx_did` (`data_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1676 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='多租户改造';

-- ----------------------------
-- Records of his_config_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE `permissions` (
  `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `resource` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `action` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of permissions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  UNIQUE KEY `idx_user_role` (`username`,`role`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
INSERT INTO `roles` (`username`, `role`) VALUES ('nacos', 'ROLE_ADMIN');
COMMIT;

-- ----------------------------
-- Table structure for tenant_capacity
-- ----------------------------
DROP TABLE IF EXISTS `tenant_capacity`;
CREATE TABLE `tenant_capacity` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='租户容量信息表';

-- ----------------------------
-- Records of tenant_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for tenant_info
-- ----------------------------
DROP TABLE IF EXISTS `tenant_info`;
CREATE TABLE `tenant_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=DYNAMIC COMMENT='tenant_info';

-- ----------------------------
-- Records of tenant_info
-- ----------------------------
BEGIN;
INSERT INTO `tenant_info` (`id`, `kp`, `tenant_id`, `tenant_name`, `tenant_desc`, `create_source`, `gmt_create`, `gmt_modified`) VALUES (1, '1', '636732f8-f054-4ee3-9fb5-4a03c502d902', 'develop', '开发环境', 'nacos', 1659863192567, 1659863192567);
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `password` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` (`username`, `password`, `enabled`) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
